package xyz.jcat.generator.mybatis.config;

import com.baomidou.mybatisplus.annotation.IdType;
import lombok.Getter;
import lombok.Setter;

/**
 * 生成文件所需的个性化配置类
 *
 * @author yueyue
 * @Time 2017-05-16 19:13
 */
@Getter
@Setter
public class PersonalizedConfig {
    /**
     * 生成的package规则为 group + projectName + 类package
     */
    private String group = "null";
    private String projectName = "null";
    private String poPackage = "domain.po";
    private String daoPackage = "domain.dao";
    private String servicePackage = "service";
    private String serviceImplPackage = "service.impl";
    /**
     * 生成mapper.xml存放的绝对路径
     */
    private String mapperXmlPath;
    private String poName = "%s";
    private String daoName = "I%sDao";
    private String mapperName = "%sMapper";
    private String serviceName = "I%sService";
    private String serviceImplName = "%sService";

    private boolean createPo = true;
    private boolean createDao = true;
    private boolean createMapper = true;
    private boolean createIService = true;
    private boolean createService = true;
    private boolean createBase = true;
    private boolean useLombok = true;

    private IdType idType = IdType.ASSIGN_ID;

    /**
     * 存放类的根路径（绝对路径）
     */
    private String saveDir = "D://java";
    /**
     * 生成类注释中的@author
     */
    private String author;
    /**
     * 表的前缀名
     */
    private String[] tablePrefixes;

    private String[] tableSuffixes;
    //分表时使用
    private boolean removeTableSuffix = false;
    /**
     * 需要生成代码的表名
     */
    private String[] includeTables;
    /**
     * 生成代码时要排除的表名，如果includeTables有元素则无视该字段
     * 所以includeTables和excludeTables只需配置其一即可
     */
    private String[] excludeTables;
    /**
     * po字段名是否需要下划线转驼峰
     */
    private boolean fieldRemoveUnderline;

}
